<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>layui.form小例子</title>
    <!-- 引入 layui.css -->
    <link rel="stylesheet" href="//unpkg.com/layui@2.6.8/dist/css/layui.css"/>
</head>
<style>
    #app {
        width: 600px;
        height: auto;
        margin-left: 410px;

    }

    body {
        background-image: url("https://images.pexels.com/photos/2907031/pexels-photo-2907031.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500");
    }
    h1{
        margin-top: 80px;
    }
</style>
<body>

<div id="app">

    <h1 align="center">学生入住登记</h1>
    <br>
    <form class="layui-form"> <!-- 提示：如果你不想用form，你可以换成div等任何一个普通元素 -->


        <div class="layui-form-item">
            <label class="layui-form-label">学生学号</label>
            <div class="layui-input-block">
                <input type="text" name="" placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">姓名</label>
            <div class="layui-input-block">
                <input type="text" name="" placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">楼宇</label>
            <div class="layui-input-block">
                <select name="interest" lay-filter="aihao">
                    <option value="0">A楼宇</option>
                    <option value="1">B楼宇</option>
                    <option value="2">C楼宇</option>
                </select>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="*">立即入住</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置表单</button>
            </div>
        </div>
        <!-- 更多表单结构排版请移步文档左侧【页面元素-表单】一项阅览 -->
    </form>
</div>

<script src="//unpkg.com/layui@2.6.8/dist/layui.js"/>
<script>
    layui.use('form', function () {
        var form = layui.form;

        //各种基于事件的操作，下面会有进一步介绍
    });
</script>
</body>
</html>